package health_system.health_system.websocket.Model;

/**
     * 消息送达状态枚举
     */
    public enum DeliveryStatus {
        SENT("sent"),           // 已发送
        DELIVERED("delivered"), // 已送达
        READ("read"),           // 已读
        PENDING("pending");     // 等待送达

        private final String value;

        DeliveryStatus(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }

        public static DeliveryStatus fromString(String text) {
            for (DeliveryStatus status : DeliveryStatus.values()) {
                if (status.value.equalsIgnoreCase(text)) {
                    return status;
                }
            }
            return null;
        }
    }